<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDormMeterPeriodInitReadingsTable extends Migration
{
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('dorm_meter_period_init_readings', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('period_id')->unsigned();
			$table->integer('dorm_meter_id')->unsigned();
			$table->decimal('meter_reading');
			$table->date('reading_date');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('dorm_meter_period_init_readings');
	}
};
